// @ts-ignore

/* eslint-disable */
import {request, useRequest} from 'umi';


/** 获取自动生成的前缀 GET /grs/generatePrefix */

export async function generatePrefix(params, options) {
  const res = request('/api/grs/generatePrefix', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {...params},
    ...(options || {}),
  });
  return res
}

/** 获取自动生成密钥 GET /grs/generatePrefix */

export async function generateKey(params, options) {
  const res = request('/api/grs/generateKey', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {...params},
    ...(options || {}),
  });
  return res
}



/** 分配前缀 POST /grs/saveInfo */

export async function registerUser(body, options) {
  return request('/api/grs/saveInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 注册新的后缀 POST /api/grs/saveInfo */
export async function registerOrg(body, options) {
  return request('/api/grs/saveInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 删除 POST /api/grs/deleteOrg */

export async function deleteOrg(body, options) {
  return request('/api/grs/deleteOrg', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 审核通过 POST /api/grs/approve */

export async function approve(body, options) {
  return request('/api/grs/approve', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 撤销审核 POST /api/grs/disapprove */

export async function disapprove(body, options) {
  return request('/api/grs/disapprove', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}




/** 申请新的后缀 POST /api/grs/applyForPrefix */

export async function applyForPrefix(body, options) {
  return request('/api/grs/applyForPrefix', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}



/** 更新前缀信息 POST /grs/updateOrganization */

export async function updatePrefix(body, options) {
  return request('/api/grs/updateOrganization', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 获取已分配的前缀列表 GET /grs/all */

export async function getAllPrefixes(params, options) {
  const res = request('/api/grs/all', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {...params},
    ...(options || {}),
  });
  return res
}


